﻿CREATE PROCEDURE [dbo].[televisors_update]
    @televisorId int,
    @name nvarchar(256),
    @type int=0,
    @diagonal decimal(3,1),
    @treeD bit,
    @releaseDate datetime,
    @avatar nvarchar(max)=null,
    @magazineId int = 0

AS
    UPDATE Televisors SET
        Televisors.Name = @name,
        Televisors.Type = @type,
        Televisors.Diagonal = @diagonal,
        Televisors.ThreeD = @treeD,
        Televisors.ReleaseDate = @releaseDate,
        Televisors.Avatar = @avatar,
        televisors.MagazineId = @magazineId

    WHERE Televisors.TelevisorId = @televisorId
RETURN 0
